//
//  MoreTableViewCell.m
//  A_Comic
//
//  Created by sos on 16/1/20.
//  Copyright © 2016年 sos. All rights reserved.
//

#import "MoreTableViewCell.h"

@implementation MoreTableViewCell
- (void)dealloc
{
    [_img release];
    [_nameLabel release];
    [_label release];
    [_lastLabel release];
    [super dealloc];
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        
        self.img = [[UIImageView alloc]init];
//        self.img.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:self.img];
        [self.img release];
        
        self.nameLabel = [[UILabel alloc]init];
//        self.nameLabel.backgroundColor = [UIColor greenColor];
        [self.contentView addSubview:self.nameLabel];
        [self.nameLabel release];
        
        self.label = [[UILabel alloc]init];
//        self.label.backgroundColor = [UIColor brownColor];
        [self.contentView addSubview:self.label];
        [self.label release];
        
        self.lastLabel = [[UILabel alloc]init];
//        self.lastLabel.backgroundColor = [UIColor orangeColor];
        [self.contentView addSubview:self.lastLabel];
        [self.lastLabel release];
        
        
        
    }
    return self;
    
}

-(void)layoutSubviews
{
    [super layoutSubviews];
    
    
    self.img.frame = CGRectMake(0, 10, self.contentView.frame.size.width/5, self.contentView.frame.size.height-10);
    
    self.nameLabel.frame = CGRectMake(self.img.frame.size.width, self.img.frame.origin.y, self.contentView.frame.size.width/2, self.contentView.frame.size.height/4);
    self.label.frame = CGRectMake(self.img.frame.size.width, self.nameLabel.frame.origin.y+self.nameLabel.frame.size.height, self.contentView.frame.size.width/2, self.contentView.frame.size.height/4);
    self.lastLabel.frame = CGRectMake(self.img.frame.size.width, self.label.frame.origin.y+self.label.frame.size.height, self.contentView.frame.size.width/2, self.contentView.frame.size.height/4);
    
    
    
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
